package ZorkObjects;

import java.util.HashMap;

public class Item extends ZorkObject
{
    private String writing;
    private HashMap<String, String> turnOn;

    public Item(HashMap configMap)
    {
        super(configMap);

        writing = (String)configMap.remove("writing");
        turnOn = (HashMap<String, String>)configMap.remove("turnon");
    }

	public String getWriting() {
		return writing;
	}

	public HashMap<String, String> getTurnOn() {
		return turnOn;
	}

    public String toString()
    {
        String base = super.toString();

        if(writing != null) {
            base += "writing=";
            base += writing;
            base += "\n";
        }
        if(turnOn != null) {
            base += "turnOn=";
            base += turnOn.toString();
            base += "\n";
        }

        return base;
    }
}
